Ext.define('Admin.view.announcement.AnnouncementGridPanel', {
    extend: 'Ext.grid.Panel',
    xtype: 'announcementGridPanel',
    id:'announcementGridPanel',
    	
    requires: [
    	//'Ext.grid.column.RowNumberer',
        
    	'Ext.selection.CheckboxModel'
    ],
    title: '公告管理',
    //store: Ext.data.StoreManager.lookup('simpsonsStore'),
	bind: '{announcementDataList}',
    selModel: {
    selType: 'checkboxmodel',
        checkOnly: true,
        showHeaderCheckbox: true
    },
    columns: [
    		//{xtype: 'rownumberer',width: 40, sortable: false},
    		{
            xtype: 'actioncolumn',
            items: [{
        		xtype: 'button',
                iconCls: 'x-fa fa-trash',
                handler : 'delete'
            }],
            cls: 'content-column',
            width: 120,
            //dataIndex: 'bool',
            text:'操作',
            tooltip: '操作 '
          },
         
		 { header: 'ID',  dataIndex: 'id',width: 120},
         { header: '内容',  dataIndex: 'content' ,flex:1,sortable: false}
    ],
    columnLines: true,
    bbar: {
      xtype: 'pagingtoolbar',//注意以后MVVM中使用新写法,不要使用Ext.create()
        //store: Ext.data.StoreManager.lookup('simpsonsStore'),
        bind: '{announcementDataList}',
        displayInfo: true,
        displayMsg: 'Displaying topics {0} - {1} of {2}',
        emptyMsg: "No topics to display",
        items:[ {
            text: '批量删除',
            listeners: {
               click:'deletes'
            }
        },{
            text: '添加公告',
            listeners: {
                click:'openAddWindow'
            }
        }]
    }
	
});